<!DOCTYPE html>
<html lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户编辑</title>
    <link rel="stylesheet" type="text/css" href="/layui/css/layui.css" media="all"/>
    <script src="/layui/layui.js" charset="utf-8"></script>
</head>
<body>
<form class="layui-form layui-form-pane" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" name="userName" required lay-verify="required" placeholder="请输入姓名"
                   autocomplete="off" class="layui-input" th:value="${user.userName}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">手机</label>
        <div class="layui-input-block">
            <input type="text" name="phone" required lay-verify="required|phone" placeholder="请输入手机"
                   autocomplete="off" class="layui-input"th:value="${user.phone}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-block" >
            <input type="password" name="password" required lay-verify="required" placeholder="请输入手机"
                   autocomplete="off" class="layui-input" th:value="${user.password}">
        </div>
    </div>

    <div class="layui-form-item " pane>
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="1" title="男" checked>
            <input type="radio" name="sex" value="0" title="女" >
        </div>
    </div>
    <div class="layui-form-item " pane>
        <label class="layui-form-label">角色</label>
        <div class="layui-input-block">
            <input type="radio" name="userRole" value="1" title="管理">
            <input type="radio" name="userRole" value="0" title="员工" checked>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block" style="float: right">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script>
    layui.use(['form'],function () {
        var form = layui.form;
    })

</script>
</body>
</html>